<?php

Class Mlogin extends Ci_Model
{
	function __construct()
	{
    	parent:: __construct();
    	$this->load->database();
    }	

	function check_user($username, $password)
	{

		$pass = md5("snb".$password);
		$sql  = "SELECT * from pengguna 
		        where username = '$username' and password = '$pass'";
		//echo $sql;exit;
		         	
		$query = $this->db->query($sql);
		$count = $query->num_rows();

		if($count > 0) 
			return TRUE;
		else 
			return FALSE;

	}
}